package consts

import (
	"hotgo/internal/library/dict"
	"hotgo/internal/model"
)

func init() {
	dict.RegisterEnums("auctionStatus", "拍卖状态", AuctionStatusOptions)
	dict.RegisterEnums("auctionListType", "拍卖列表类型", AuctionListTypeOptions)
	dict.RegisterEnums("auctionLogStatus", "拍卖记录状态", AuctionLogStatusOptions)
}

const (
	AuctionStatusWaitStart = iota
	AuctionStatusWorking
	AuctionStatusEnd
	AuctionStatusClosed
)

// AuctionStatusOptions 拍卖状态选项
var AuctionStatusOptions = []*model.Option{
	dict.GenWarningOption(AuctionStatusWaitStart, "未开始"),
	dict.GenSuccessOption(AuctionStatusWorking, "进行中"),
	dict.GenErrorOption(AuctionStatusEnd, "已结束"),
	dict.GenDefaultOption(AuctionStatusClosed, "已关闭"),
}

const (
	AuctionListTypeWorking = iota + 1
	AuctionListTypeToday
)

var AuctionListTypeOptions = []*model.Option{
	dict.GenDefaultOption(AuctionListTypeWorking, "进行中"),
	dict.GenDefaultOption(AuctionListTypeToday, "今日"),
}

const (
	AuctionLogWaitStart = iota + 1
	AuctionLogWorking
	AuctionLogEnd
)

var AuctionLogStatusList = []int{AuctionLogWaitStart, AuctionLogWorking, AuctionLogEnd}

var AuctionLogStatusOptions = []*model.Option{
	dict.GenWarningOption(AuctionLogWaitStart, "未开始"),
	dict.GenSuccessOption(AuctionLogWorking, "进行中"),
	dict.GenErrorOption(AuctionLogEnd, "已结束"),
}
